package com.material.operation.services.impl;

import com.material.operation.bean.CastingDistinguish;
import com.material.operation.daos.CastingDistinguishDao;
import com.material.operation.services.CastingDistinguishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author : hongwei.zhang
 * @className : operation - CastingDistinguishServiceImpl
 * @description : 材料铸造方式业务类
 * @date : 2020-11-17 22:49
 */
@Service
public class CastingDistinguishServiceImpl implements CastingDistinguishService {
    @Autowired
    private CastingDistinguishDao castingDistinguishDao;
    @Override
    public List<String> findCastingMethodListByCode(String code) {
        return castingDistinguishDao.findCastingMethodListByCode(code);
    }

    @Override
    public List<CastingDistinguish> findHeatTreatmentListByCodeAndCastingMethod(String code, String castingMethod) {
        HashMap<String,String> map = new HashMap<>();
        map.put("code",code);
        map.put("castingMethod",castingMethod);
        return castingDistinguishDao.findHeatTreatmentListByCodeAndCastingMethod(map);
    }
}
